package com.dxk.controller;


import com.dxk.mapper.UserMapper;
import com.dxk.pojo.UserBlog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    private UserMapper userMapper;
    @Autowired
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }




    @GetMapping("/all")
    public List<UserBlog> all(){
        List<UserBlog> allUser = userMapper.getAllUser();

         return  allUser;
    }


}
